The present invention relates generally to a positioning apparatus in a digital servo device, such as a robot having a servomotor, and more particularly, to an apparatus having a feedback control device and a detector for detecting the phase relationship among the signals which are different in phase timing from each other (which will be referred to as A phase and B phase, respectively) by a signal for detecting an original point of the detector itself (referred to as Z phase hereinafter). These two signals of A phase and B phase are related to the amount and the direction of the operation of a mechanical device or a driving device driven by a servomotor or the like. A predetermined phase relationship is provided among the A, B and Z phases (for example, the B phase should be varied only one time during the period the Z phase is output), and the phase relationship is detected by the detector. The positioning system in a digital servo device operates the mechanical device in accordance with the speed of command pulses, the number of the command pluses and an operating direction signal. The above described phase relationship among the Z phase, A phase and B phase is not a unique phase relationship, but the phase relationship is a well-known relationship used in a detector known as an optical-encoder or the like.
An example of the conventional positioning system in a servo device will be described in conjunction with FIG. 1 showing a circuit diagram, FIG. 2 showing a timing chart for an interface circuit in FIG. 1 except for the feedback circuit 4), FIG. 3 showing a positioning command circuit and FIG. 4 showing a timing chart for explaining the operation of positioning an object at a predetermined point.
A clock generator 1 generates two clock signals C.sub.1 and C.sub.2 alternately and the timing at the active level (equal to the (H) level in this embodiment) of the signal C.sub.1 is never coincident with that of the signal C.sub.2. Command pulses are applied to a receiving shift register (RSR) 2 which is composed of two flip-flops FF and the receiving shift register RSR 2 carries out a series of shifting operations in synchronization with the clock signal C.sub.1. By utilizing the output signals F.sub.1 and F.sub.2 from FFs of the RSR 2, the rising edge of the command pulses E are latched. At the timing of the clock signal C.sub.2, positive direction command pulses A and reverse direction command pulses B are produced by using gate circuits G.sub.1, G.sub.2, G.sub.3 and G.sub.4 depending upon the level of a direction signal L. As to feed back signals, A-phase signals F are received by an RSR 3 composed of two series-connected FFs in a manner similar to that of the RSR 2 for receiving the command pulse E. The rising edge and the falling edge of A-phase signals F (in the case of the low level of the B-phase signals G) are detected on the basis of level of the outputs 3a and 3b of two FFs of the RSR 3, and positive direction detecting pulses C and reverse direction detecting pulses D are produced by the use of gate circuits G.sub.5 to G.sub.10.
In FIG. 1, the rising edge corresponds to the positive direction detecting pulse C and the falling edge corresponds to the reverse direction detecting pulse D. However, the shifting operation of the RSR 3 is carried out by the clock signal C.sub.2 and the output timing of pulses C and D is controlled by the clock signal C.sub.1. As a result, the timing of the positive and the reverse direction command pulses A and B can be completely separated from that of the positive and the reverse direction detecting pulses C and D, so that the processing of the signal in a feedback circuit 4 can be easily carried out. The signals A, B, C and D are applied to the feedback circuit 4 having a positional deviation counter and driving polarity judging circuit 41, a D/A converter 42 and a driving circuit 43 and a motor M including the detector (i.e. rotary encoder).
There are many circuits which can be used as the feedback circuit 4. However, the particular construction of the feedback circuit 4 is not an important feature of the present invention, so that the detailed description of the feedback circuit 4 will be omitted. The signals to be applied to the feedback circuit 4 are the signals A, B, C and D and a reset signal J for initially setting the feedback circuit 4.
The positive and the reverse direction detecting signals C and D correspond to the rising edge and the falling edge of the A-phase signal F, respectively, when the B-phase signal G is in the low state. However, it is possible to obtain the positive and the reverse direction detecting signals in accordance with the falling edge and the rising edge of the A-phase signal F, respectively when the B-phase signal G is in the high state in accordance with the rising edge and the falling edge, or of the B-phase signal in a similar way. As mentioned above, it is well known that the positive and the reverse direction detecting signals can be obtained by combining these signals.
In the positioning of the digital servo device arranged as described above, a circuit shown in FIG. 3 is generally used as an outer control device, and a FF 10 for determining a predetermined position is set by the output 9a of a start switch 9 for positioning. Thus, a positioning command pulse generator 11 is operated so that the command pulses E are continuously produced.
When the mechanical device (e.g., industrial robot) is rendered to operate and rough positioning detector 14 produces a rough or coarse positioning signal 14a, an AND operation is carried out between the signal 14a and the positioning command 10a and then a command signal I for positioning the controlled object at the predetermined position is output through a buffer 16. The command signal I is continued to be produced until the digital servo device detects that the positioning is terminated and the positioning FF 10 is reset by a positioning command reset signal H.
In accordance with the above-described positioning operation in the outer controlling device, the predetermined point is detected by applying the command signal I, the Z-phase signal K of the detector and an edge signal M due to the change of the B-phase signal to an AND circuit 7 which produces an output reset signal J to carry out the initial set operation of the feedback circuit 4. At the same time, a position detecting signal H is output and applied to the outer controlling device as the positioning operation is terminated.
Since the friction torque in the mechanism varies, it is virtually impossible to provide a fixed time relationship between the command pulse and the detected output. Therefore, as shown in the timing chart of FIG. 4, at the same time the reset signal J for resetting the feedback circuit in response to the detection of the positioned condition and the positioning command reset signal H are output, there is the possibility of the occurrence of the command pulses E. In this case, the feedback circuit 4 has two possible conditions. One is the condition that the mechanical position obtained by the reset can be kept and another is the condition that the mechanical position is changed one or more pulses due to the command pulse. Either condition is selected in accordance with the critical timing. Therefore, it is very difficult to increase the reproducibility of the accuracy of the positioning. Moreover, generally speaking, in such an apparatus for a digital servo device, most positioning operations are performed as a part of a sequence of operations. More particularly, more than two target positions are provided, so that it is impossible to determine the circuit for generating the positioning command pulse at a critical timing applicable to each target position. Therefore, such a circuit is sometimes included in the outer controlling device in which the sequence is variable so as to be adaptable to various conditions. In such a case, the outer controlling circuit is provided so as to be separate from the digital servo control device, so that the buffers designated by references 16 to 21 in FIG. 3 are needed for eliminating the effect due to the noise. Due to these buffers, the time delay of the signal is increased, and the possibility of receiving the command pulse after the positioning is also increased. Therefore, the positioning error will tend to occur and a complex technique is required to solve this problem.